﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="adlist.aspx.cs" Inherits="Crm_ADList" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="crm.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery-1.4.4.min.js" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(document).ready(function()
        {
            var selobj = null;
            var selobjcolor = null;
            //d = this.style.backgroundColor; this.style.backgroundColor = '#D1F880';
            $(".trnei,.lupai").each(function()
            {
                $(this).click(function()
                {
                    try
                    {
                        selobj.css("background-color", selobjcolor);
                    }
                    catch (ex)
                    {
                    }
                    selobjcolor = $(this).css("background-color");
                    $(this).css("background-color", "#D1F880");
                    selobj = $(this);
                });
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div style="padding: 0 5px; width: 500px;">
        <div class="nav">
            当前位置：内容和广告管理</div>
        <asp:Button ID="btnAdd" runat="server" Text="新增一行" OnClick="btnAdd_Click" />
        <asp:DropDownList ID="dropPartner" runat="server"  DataTextField="PartnerName"
            DataValueField="PartnerID" AppendDataBoundItems="true" OnSelectedIndexChanged="dropPartner_SelectedIndexChanged"
            AutoPostBack="true">
            <asp:ListItem Value="">所有</asp:ListItem>
        </asp:DropDownList>
        <asp:GridView ID="gvList" runat="server" SkinID="gvcustomer" AutoGenerateColumns="False"
            DataKeyNames="id" AllowPaging="True" PageSize="25"  OnRowCancelingEdit="gvList_RowCancelingEdit"
                            OnRowDeleting="gvList_RowDeleting" OnRowEditing="gvList_RowEditing" OnRowUpdating="gvList_RowUpdating">
            <Columns>
                <asp:TemplateField HeaderText="编号">
                    <ItemTemplate>
                        <%#Container.DataItemIndex+1 %></ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="ename" HeaderText="代码" SortExpression="type_code" />
                <asp:BoundField DataField="cname" HeaderText="说明" SortExpression="type" />
                <asp:CommandField ShowEditButton="true" ShowDeleteButton="true" />
                <asp:TemplateField HeaderText="修改内容">
                    <ItemTemplate>
                        <a href="EditContent.aspx?id=<%#Eval("id") %>">修改内容</a>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
          <div>
                        <webdiyer:AspNetPager ID="pager" CssClass="paginator" CurrentPageButtonClass="cpb"
                            runat="server" OnPageChanged="AspNetPager1_PageChanged" PageSize="20" PageIndexBoxType="TextBox"
                            ShowPageIndexBox="Always" FirstPageText="首页" LastPageText="尾页" PrevPageText="上页"
                            NextPageText="下页" SubmitButtonText="Go" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到">
                        </webdiyer:AspNetPager>
                        <span style="float: left; margin-top: 15px;">共<%=total %>条 当前:<%=pager.CurrentPageIndex %>
                            /
                            <%=pagecount %>页</span>
                        <div style="clear: both;">
                        </div>
           </div>
    </div>    
    </form>
</body>
</html>
